import request from '@/utils/request'

// 查询任务erp列表
export function listTaskerp(query) {
  return request({
    url: '/business/taskerp/list',
    method: 'get',
    params: query
  })
}

export function getUserIdList(query) {
  return request({
    url: '/business/taskerp/getUserIdList',
    method: 'get',
    params: query
  })
}

export function getAssignTasksList(query) {
  return request({
    url: '/business/taskerp/getAssignTasksList',
    method: 'get',
    params: query
  })
}

export function getDoesItExist(query) {
  return request({
    url: '/business/taskerp/getDoesItExist',
    method: 'get',
    params: query
  })
}

export function getReceiveTasksPersonList(query) {
  return request({
    url: '/business/taskerp/getReceiveTasksPersonList',
    method: 'get',
    params: query
  })
}

export function getMakeUpList(query) {
  return request({
    url: '/business/taskerp/getMakeUpList',
    method: 'get',
    params: query
  })
}

export function getArtistAllocationList(query) {
  return request({
    url: '/business/taskerp/getArtistAllocationList',
    method: 'get',
    params: query
  })
}

// 查询任务erp详细
export function getTaskerp(id) {
  return request({
    url: '/business/taskerp/' + id,
    method: 'get'
  })
}

// 新增任务erp
export function addTaskerp(data) {
  return request({
    url: '/business/taskerp',
    method: 'post',
    data: data
  })
}

// 修改任务erp
export function updateTaskerp(data) {
  return request({
    url: '/business/taskerp',
    method: 'put',
    data: data
  })
}

// 修改任务erp
export function receivingEdit(data) {
  return request({
    url: '/business/taskerp/receivingEdit',
    method: 'put',
    data: data
  })
}

// 删除任务erp
export function delTaskerp(id) {
  return request({
    url: '/business/taskerp/' + id,
    method: 'delete'
  })
}

// 导出文件
export function exportExcel(data){
  return request({
    url: '/business/taskerp/export',
    method: 'post',
    data: data
  })
}

// 导出文件
export function oldFileName(data){
  return request({
    url: '/common/oldName',
    method: 'post',
    data: data
  })
}
